<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="layouts::header"></head>
<body>
<nav th:replace="layouts::navbar"></nav>

<div class="container-fluid">
    <form th:action="@{/sDetails/save}" th:object="${sDetails}" method="POST">
        <input type="hidden" th:field="${sDetails.spId}">
        <div class="logo"></div>
        <hr>


        销售ID:<input type="text"  th:field="*{sales}" list="saleId">
        <datalist id="saleId">
            <option th:each="sale : ${allSale}" th:value="${sale.saleId}" th:text="${sale.saleId}"></option>
        </datalist>

        商品名称： <select multiple="multiple" th:field="*{commodities}">
                    <option th:each="commodity : ${allCommodities}" th:value="${commodity.commodityId}" th:text="${commodity.name}"></option>
                </select>

        <label for="number">销售数量:</label>
        <input type="text" id="number" th:field="${sDetails.quantity}">
        <label for="amount">销售总价:</label>
        <input type="text" id="amount" th:field="${sDetails.amount}">
        <label for="price">销售价格:</label>
        <input type="text" id="price" th:field="${sDetails.price}">
        <button type="submit">新增销售明细</button>
    </form>
</div>
</body>
</html>